package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcDiscussAttach;
import com.visizen.wisdomclass.server.model.WcDiscussAttachExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcDiscussAttachMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_attach
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcDiscussAttachSqlProvider.class, method="countByExample")
    int countByExample(WcDiscussAttachExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_attach
     *
     * @mbggenerated
     */
    @DeleteProvider(type=WcDiscussAttachSqlProvider.class, method="deleteByExample")
    int deleteByExample(WcDiscussAttachExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_attach
     *
     * @mbggenerated
     */
    @Delete({
        "delete from wc_discuss_attach",
        "where discuss_attach_id = #{discuss_attach_id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long discuss_attach_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_attach
     *
     * @mbggenerated
     */
    @Insert({
        "insert into wc_discuss_attach (discuss_attach_id, discuss_id, ",
        "attach_id, create_time)",
        "values (#{discuss_attach_id,jdbcType=BIGINT}, #{discuss_id,jdbcType=BIGINT}, ",
        "#{attach_id,jdbcType=BIGINT}, #{create_time,jdbcType=TIMESTAMP})"
    })
    int insert(WcDiscussAttach record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_attach
     *
     * @mbggenerated
     */
    @InsertProvider(type=WcDiscussAttachSqlProvider.class, method="insertSelective")
    int insertSelective(WcDiscussAttach record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_attach
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcDiscussAttachSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="discuss_attach_id", property="discuss_attach_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="discuss_id", property="discuss_id", jdbcType=JdbcType.BIGINT),
        @Result(column="attach_id", property="attach_id", jdbcType=JdbcType.BIGINT),
        @Result(column="create_time", property="create_time", jdbcType=JdbcType.TIMESTAMP)
    })
    List<WcDiscussAttach> selectByExample(WcDiscussAttachExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_attach
     *
     * @mbggenerated
     */
    @Select({
        "select",
        "discuss_attach_id, discuss_id, attach_id, create_time",
        "from wc_discuss_attach",
        "where discuss_attach_id = #{discuss_attach_id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="discuss_attach_id", property="discuss_attach_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="discuss_id", property="discuss_id", jdbcType=JdbcType.BIGINT),
        @Result(column="attach_id", property="attach_id", jdbcType=JdbcType.BIGINT),
        @Result(column="create_time", property="create_time", jdbcType=JdbcType.TIMESTAMP)
    })
    WcDiscussAttach selectByPrimaryKey(Long discuss_attach_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_attach
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcDiscussAttachSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcDiscussAttach record, @Param("example") WcDiscussAttachExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_attach
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcDiscussAttachSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WcDiscussAttach record, @Param("example") WcDiscussAttachExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_attach
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcDiscussAttachSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WcDiscussAttach record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_attach
     *
     * @mbggenerated
     */
    @Update({
        "update wc_discuss_attach",
        "set discuss_id = #{discuss_id,jdbcType=BIGINT},",
          "attach_id = #{attach_id,jdbcType=BIGINT},",
          "create_time = #{create_time,jdbcType=TIMESTAMP}",
        "where discuss_attach_id = #{discuss_attach_id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(WcDiscussAttach record);
}